package com.share.es;

import com.share.domain.learn.User;

import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author caifan
 * 2018/6/26
 */
@Repository
public interface UserESRepository extends ElasticsearchRepository<User, Long> {
    List<User> findUserByUsername(String username);

    List<User> findUsersByUsernameLike(String username, Pageable pageable);

    List<User> findByUsernameIn(List<String> usernames, Pageable pageable);

}
